//
//  FootPrintStoreCell.swift
//  XiaoJingMallSwift
//
//  Created by beisheng03 on 2017/7/28.
//  Copyright © 2017年 beisheng. All rights reserved.
//

import UIKit
import SDWebImage

class FootPrintStoreCell: BaseTableViewCell {
    
    @IBOutlet weak var indicatorView: UIActivityIndicatorView!
    
    @IBOutlet weak var leftImageView: UIImageView!
    
    @IBOutlet weak var topLabel: UILabel!
    
    @IBOutlet weak var bottomLabel: UILabel!
    
    var model : FootStoreModel? {
        
        didSet{
            
            if model == nil {
                return
            }
            
            indicatorView.startAnimating()
            leftImageView.sd_setImage(with: URL(string :model!.goods_image_url), placeholderImage: UIImage.defaulImage(), options: []) { (image, _, _, _) in
                self.indicatorView.stopAnimating()
                
            }
            
            topLabel.text = model?.goods_name
            
            bottomLabel.text = "¥\(model!.goods_price)"
            
            
            
        }
        
    }
    

    override func awakeFromNib() {
        super.awakeFromNib()
        contentView.backgroundColor = UIColor.white
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
